package com.shazhu.nongjt.service.impl;

import java.util.List;
import com.shazhu.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.shazhu.nongjt.mapper.SysCertPrintSettingMapper;
import com.shazhu.nongjt.domain.SysCertPrintSetting;
import com.shazhu.nongjt.service.ISysCertPrintSettingService;

/**
 * 合格证打印设置Service业务层处理
 * 
 * @author shazhu
 * @date 2025-09-29
 */
@Service
public class SysCertPrintSettingServiceImpl implements ISysCertPrintSettingService 
{
    @Autowired
    private SysCertPrintSettingMapper sysCertPrintSettingMapper;

    /**
     * 查询合格证打印设置
     * 
     * @param id 合格证打印设置主键
     * @return 合格证打印设置
     */
    @Override
    public SysCertPrintSetting selectSysCertPrintSettingById(Long id)
    {
        return sysCertPrintSettingMapper.selectSysCertPrintSettingById(id);
    }

    /**
     * 查询合格证打印设置列表
     * 
     * @param sysCertPrintSetting 合格证打印设置
     * @return 合格证打印设置
     */
    @Override
    public List<SysCertPrintSetting> selectSysCertPrintSettingList(SysCertPrintSetting sysCertPrintSetting)
    {
        return sysCertPrintSettingMapper.selectSysCertPrintSettingList(sysCertPrintSetting);
    }

    /**
     * 新增合格证打印设置
     * 
     * @param sysCertPrintSetting 合格证打印设置
     * @return 结果
     */
    @Override
    public int insertSysCertPrintSetting(SysCertPrintSetting sysCertPrintSetting)
    {
        sysCertPrintSetting.setCreateTime(DateUtils.getNowDate());
        return sysCertPrintSettingMapper.insertSysCertPrintSetting(sysCertPrintSetting);
    }

    /**
     * 修改合格证打印设置
     * 
     * @param sysCertPrintSetting 合格证打印设置
     * @return 结果
     */
    @Override
    public int updateSysCertPrintSetting(SysCertPrintSetting sysCertPrintSetting)
    {
        sysCertPrintSetting.setUpdateTime(DateUtils.getNowDate());
        return sysCertPrintSettingMapper.updateSysCertPrintSetting(sysCertPrintSetting);
    }

    /**
     * 批量删除合格证打印设置
     * 
     * @param ids 需要删除的合格证打印设置主键
     * @return 结果
     */
    @Override
    public int deleteSysCertPrintSettingByIds(Long[] ids)
    {
        return sysCertPrintSettingMapper.deleteSysCertPrintSettingByIds(ids);
    }

    /**
     * 删除合格证打印设置信息
     * 
     * @param id 合格证打印设置主键
     * @return 结果
     */
    @Override
    public int deleteSysCertPrintSettingById(Long id)
    {
        return sysCertPrintSettingMapper.deleteSysCertPrintSettingById(id);
    }
}
